import 'vue-router';

declare module 'vue-router' {
  interface RouteMeta {
    isAdmin?: boolean;
    requiresAuth?: boolean;
    title?: string;
    hiddenHeaderMenu?: boolean;
  }
}

//基础路由名
export enum BasicRouter {
  HOME = 'Home',
  REDIRECT = 'Redirect',
  NOTFOUND = 'NotFound',
  LOGIN = 'Login',
}

// 顶部菜单路由路径
export enum HeaderRouterPath {
  HOME = '/',
  DATASHOW = '/datashow',
  DATACOLLECTION = '/datacollection',
  LOGIN = '/login',
}

export enum AsideMenuRouter {
  INFECTIOUSDISEASES = 'infectiousdiseases',
  CLASSA = 'classa',
  CLASSB = 'classb',
  CLASSC = 'classc',
  GENERALDISEASE = 'generaldisease',
  EPIDEMICDISEASE = 'epidemicdisease',
  CHRONICDISEASE = 'chronicdisease',
  EARLYWARNING = 'earlywarning',
}

export enum AsideMenuPath {
  INFECTIOUSDISEASES = '/datashow/infectiousdiseases',
  CLASSA = '/datashow/infectiousdiseases/classa',
  CLASSB = '/datashow/infectiousdiseases/classb',
  CLASSC = '/datashow/infectiousdiseases/classc',
  GENERALDISEASE = '/datashow/generaldisease',
  EPIDEMICDISEASE = '/datashow/generaldisease/epidemicdisease',
  CHRONICDISEASE = '/datashow/generaldisease/chronicdisease',
  EARLYWARNING = '/datashow/earlywarning',
}

export interface IHeaderMenu {
  index: string;
  title: string;
  icon?: string;
  requireAuth?: boolean;
  authAfterHidden?: boolean;
}

export type IAsideItem = Omit<IHeaderMenu, 'requireAuth' | 'authAfterHidden'>;

export type IAsideMenu = IAsideItem & {
  children: IAsideItem[];
};
